package com.xuecheng.base.exception;

import lombok.Getter;

/**
 * Created with IntelliJ IDEA.
 * Description: 学成在线项目异常类
 * User: ws
 * Date: 2024-06-11
 * Time: 16:54
 */
@Getter
public class XueChengPlusException extends RuntimeException {

    private String errMessage;

    public XueChengPlusException() {
        super();
    }

    public XueChengPlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new XueChengPlusException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new XueChengPlusException(errMessage);
    }

}
